import React from 'react';
import Icon from '/@/components/icon';
import styles from '../index.module.scss';
import { useDispatchMenu } from '/@/store/hooks/menu';
import KeyboardEventHandler from 'react-keyboard-event-handler';
export default function CloseFull() {
  const { stateStateCurrFull } = useDispatchMenu();

  return (
    <div className={styles.layout_navbars_close_full}>
      <KeyboardEventHandler
        handleKeys={['esc']}
        onKeyEvent={(key: any) => {
          if (key === 'esc') {
            stateStateCurrFull(false);
          }
        }}
      ></KeyboardEventHandler>
      <div className={styles['layout_navbars_close_full_icon']}>
        <Icon icon='CloseOutlined' onClick={() => stateStateCurrFull(false)} />
      </div>
    </div>
  );
}
